<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /*
        如何让下面元素不受上面浮动元素的影响
        1.clear:both;//给下面元素
        2.给float元素的父元素设置overflow:hidden;
        */
        .one,.two,.three{
            width: 100px;
            height: 100px;
            float: left;
        }
        .one{
            background: red;
        }
        .two{
            background: blue;
        }
        .three{
            background: pink;
        }
        .four{
            /*清除浮动*/
            /* clear: both; */
            width: 200px;
            height: 200px;
            background: salmon;
        }
        .parent{
            overflow: hidden;
        }
    </style>
</head>
<body>
    <!--浮动float的目的
        让元素并排显示
    -->
    <div class="parent">
        <div class="one">

        </div>
        <div class="two">
            
        </div>
        <div class="three">
            
         </div>
    </div>
    
    <p class="four"></p>
</body>
</html>